import service from "@/utils/request.js";

// 分类列表

export function categoryListApi(data) {
    return service({
        url: "/category/list",
        method: "get",
        params: data
    })
}

// 添加分类的级联菜单数据
export function addCategoryListApi(data) {
    return service({
        url: "/category/addlist",
        method: "get",
        params: data
    })
}


// 添加分类
export function addCategoryApi(data) {
    return service({
        url: "/category/add",
        method: "post",
        data: data
    })
}

// 添加分类
export function editCategoryApi(data) {
    return service({
        url: "/category/edit",
        method: "post",
        data: data
    })
}

// 删除分类
export function categoryDeleApi(data) {
    return service({
        url: "/category/dele",
        method: "get",
        params: data
    })
}